<template>
  <div class="orderManageContainer">
    <el-tabs
      v-model="state.activeTab"
      class="topTabContainer"
      @tab-click="handleClick"
    >
      <el-tab-pane label="菜品类别" name="1">
        <div class="bodyContainer">bodycontainer1</div>
      </el-tab-pane>
      <el-tab-pane label="菜品库存" name="2">菜品库存</el-tab-pane>
      <el-tab-pane label="菜品资料" name="3">菜品资料</el-tab-pane>
    </el-tabs>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from "vue";
export default defineComponent({
  setup() {
    const state = reactive({
      activeTab: "1",
    });
    const handleClick = (tab: any) => {
      state.activeTab = tab.paneName;
      console.log(tab.paneName);
    };

    return {
      state,
      handleClick,
    };
  },
});
</script>

<style lang="less" scoped>
.orderManageContainer {
  .topTabContainer {
    height: 40px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .bodyContainer {
    padding: 40px;
  }
}
</style>
